<p>Non-abstract classes and enums with non-<code>static</code>, <code>private</code> members should explicitly initialize those members, either in a
constructor or with a default value.</p>
<h2>Noncompliant Code Example</h2>
<pre>
class A { // Noncompliant
  private int field;
}
</pre>
<h2>Compliant Solution</h2>
<pre>
class A {
  private int field;

  A(int field) {
    this.field = field;
  }
}
</pre>
<h2>Exceptions</h2>
<p> * Class implementing a Builder Pattern (name ending with "Builder").</p>
<p> * <a href="https://docs.oracle.com/javaee/7/tutorial/index.html">Java EE</a> class annotated with:</p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/annotation/ManagedBean.html">ManagedBean</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/ejb/MessageDriven.html">MessageDriven</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/ejb/Singleton.html">Singleton</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/ejb/Stateful.html">Stateful</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/ejb/Stateless.html">Stateless</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/jws/WebService.html">WebService</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/annotation/WebFilter.html">WebFilter</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/annotation/WebServlet.html">WebServlet</a></p>
<p> * Class and field annotated with:</p>
<p> <strong></strong> <a href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/index.html">Plexus Component
Annotations</a></p>
<p> <strong></strong> <a href="https://maven.apache.org/developers/mojo-api-specification.html">Maven Mojo</a></p>
<p> * Field annotated with:</p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/annotation/Resource.html">Resource</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/ejb/EJB.html">EJB</a></p>
<p> <strong></strong> <a href="https://docs.oracle.com/javaee/7/api/javax/inject/Inject.html">Inject</a></p>
<p> <strong></strong> <a
href="https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowired.html">Autowired</a></p>

